<? if (!defined("BASEPATH")) exit("No direct script access allowed");

//Common::pr($getScholarship);

echo	"<h2 class=\"blue title\">".$this->lang->line("SCHOLARSHIPS")."</h2>";
	
if(isset($getScholarship) and count($getScholarship)) {

	foreach($getScholarship as $schData) {
		if(isset($schData["INS"])) {
			foreach($schData["INS"] as $insId => $insData) {
				$_getScholarship[$insId][] = $schData;
			}
		}
	}
	
	//Common::pr($_getScholarship);

	echo	"<div class=\"accordion\">";
	foreach($_getScholarship as $insId => $insData) {
		echo		"<article class=\"box\">";
		echo			"<header>";
		echo				"<h3>".$insData[0]["INS"][$insId]["insName"]."</h3>";
		echo			"</header>";
		echo			"<section class=\"wide\">";
		echo				"<ul>";
		foreach($insData as $schData) {
			echo					"<li>".anchor(site_url()."scholarships/".$schData["schUrlName"], $schData["schName"])."</a></li>";
		}
		echo				"</ul>";
		echo			"</section>";
		echo		"</article>";
	}
	echo	"</div>";
} else {
	echo	"<div class=\"box gray\">".$this->lang->line("THERE_IS_CURRENTLY_NO_DATA_TO_DISPLAY")."</div>";
}